package com.itkjb.leisurely.resource.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itkjb.leisurely.core.base.IBaseService;
import com.itkjb.leisurely.core.model.SearchModel;
import com.itkjb.leisurely.resource.sys.model.SysUserRoleModel;
import com.itkjb.leisurely.resource.sys.model.dto.SysRoleUserDTO;
import com.itkjb.leisurely.resource.sys.model.vo.SysUserRoelVO;
import com.itkjb.leisurely.resource.sys.model.vo.SysUserVO;

import java.util.List;

/**
 * <p>
 * 用户绑定角色 服务类
 * </p>
 *
 * @author itkjb.com
 * @since 2020-07-17
 */
public interface ISysUserRoleService extends IBaseService<SysUserRoleModel> {

    /**
     * 根据 角色id 获取已绑定的用户
     * @param vo chax tiaoj
     * @return
     */
    IPage<SysUserVO> getUsersByRoleId(IPage<?> page, SysUserRoelVO vo);



    /**
     * 根据 角色code  获取已绑定的用户
     * @param dto chax tiaoj
     * @return
     */
    IPage<SysUserVO> getUsersByRoleCode(SearchModel<SysRoleUserDTO> dto);

    /**
     * 根据 角色id 获取未绑定的用户
     * @param vo 查询条件
     * @return
     */
    IPage<SysUserVO> getUsersByRoleIdNotBind(IPage<?> page, SysUserRoelVO vo);
    /**
     * 删除角色绑定的用户
     * @param vo
     * @return
     */
    boolean removeUserIdsByRoleId(SysUserRoelVO vo);


    /**
     * 查询用户绑定的角色
     * @param model
     * @return
     */
    List<SysUserRoleModel> getRolesByUserId(SysUserRoleModel model);




}
